<template>
  <div class="hello">
    <CapitalList :Capitalarray="array"></CapitalList>
  </div>
</template>
<script>
  export default {
    name: 'HelloWorld',
    components: {},
    data () {
      return {
        array:[]
      }
    },
    methods:{
      arr() {
        var random = this.$Mock.Random;
        // console.log(random.id(1,5))
        for (var i = 0; i < 10; i++) {
          var template = {
            id:random.natural(1, 30),
            money: random.natural(5, 30),
            out_trade_no: random.csentence(30, 50),
            created_at: random.date() + ' ' + random.time(), // Random.date()指示生成的日期字符串的格式,默认为yyyy-MM-dd；Random.time() 返回一个随机的时间字符串
            remark: random.natural(5, 30),
            updated_at:random.date(),
            type:'wx'
          }
          this.array.push(template)
        }
      }
    },
    watch:{

    },
    mounted(){
      this.arr()
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .hello{
    width: 100%;
    height: 100%;
  }
  h1, h2 {
    font-weight: normal;
  }
  ul {
    list-style-type: none;
    padding: 0;
  }
  li {
    display: inline-block;
    margin: 0 10px;
  }
  a {
    color: #42b983;
  }
</style>
